package com.zczy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 用户表
 * @TableName zczy_user
 */
@TableName(value ="zczy_user")
@Data
public class ZczyUser implements Serializable {
    /**
     * 用户id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 电话
     */
    @TableField(value = "mobile")
    private String mobile;

    /**
     * 账号
     */
    @TableField(value = "user_login")
    private String user_login;

    /**
     * 密码(第三方登录随机一个密码i)
     */
    @TableField(value = "user_pass")
    private String user_pass;

    /**
     * 昵称
     */
    @TableField(value = "user_nicename")
    private String user_nicename;

    /**
     * 邮箱
     */
    @TableField(value = "user_email")
    private String user_email;

    /**
     * 个人网站
     */
    @TableField(value = "user_url")
    private String user_url;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 性别1.男,2女,0保密
     */
    @TableField(value = "sex")
    private String sex;

    /**
     * 生日
     */
    @TableField(value = "birthday")
    private Date birthday;

    /**
     * 个性签名
     */
    @TableField(value = "signature")
    private String signature;

    /**
     * qq号
     */
    @TableField(value = "qq")
    private String qq;

    /**
     * 微信
     */
    @TableField(value = "wechat")
    private String wechat;

    /**
     * 省
     */
    @TableField(value = "province")
    private Integer province;

    /**
     * 市
     */
    @TableField(value = "city")
    private Integer city;

    /**
     * 省名
     */
    @TableField(value = "provinceName")
    private String provinceName;

    /**
     * 市名
     */
    @TableField(value = "cityName")
    private String cityName;

    /**
     * 用户状态  0：禁用，1：正常；2：未验证
     */
    @TableField(value = "user_status")
    private Integer user_status;

    /**
     * 用户类型1:admin,2:会员
     */
    @TableField(value = "user_type")
    private Short user_type;

    /**
     * 注册类型（0：手机，1：微信，2：qq，3：微信公众号）
     */
    @TableField(value = "create_type")
    private Integer create_type;

    /**
     * 注册时间
     */
    @TableField(value = "create_time")
    private Date create_time;

    /**
     * 最后登录ip
     */
    @TableField(value = "lastLoginIp")
    private String lastLoginIp;

    /**
     * 最后登录时间
     */
    @TableField(value = "lastLoginTime")
    private Date lastLoginTime;

    /**
     * 登录次数
     */
    @TableField(value = "login_num")
    private Integer login_num;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZczyUser other = (ZczyUser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
            && (this.getUser_login() == null ? other.getUser_login() == null : this.getUser_login().equals(other.getUser_login()))
            && (this.getUser_pass() == null ? other.getUser_pass() == null : this.getUser_pass().equals(other.getUser_pass()))
            && (this.getUser_nicename() == null ? other.getUser_nicename() == null : this.getUser_nicename().equals(other.getUser_nicename()))
            && (this.getUser_email() == null ? other.getUser_email() == null : this.getUser_email().equals(other.getUser_email()))
            && (this.getUser_url() == null ? other.getUser_url() == null : this.getUser_url().equals(other.getUser_url()))
            && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getSignature() == null ? other.getSignature() == null : this.getSignature().equals(other.getSignature()))
            && (this.getQq() == null ? other.getQq() == null : this.getQq().equals(other.getQq()))
            && (this.getWechat() == null ? other.getWechat() == null : this.getWechat().equals(other.getWechat()))
            && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getProvinceName() == null ? other.getProvinceName() == null : this.getProvinceName().equals(other.getProvinceName()))
            && (this.getCityName() == null ? other.getCityName() == null : this.getCityName().equals(other.getCityName()))
            && (this.getUser_status() == null ? other.getUser_status() == null : this.getUser_status().equals(other.getUser_status()))
            && (this.getUser_type() == null ? other.getUser_type() == null : this.getUser_type().equals(other.getUser_type()))
            && (this.getCreate_type() == null ? other.getCreate_type() == null : this.getCreate_type().equals(other.getCreate_type()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()))
            && (this.getLastLoginIp() == null ? other.getLastLoginIp() == null : this.getLastLoginIp().equals(other.getLastLoginIp()))
            && (this.getLastLoginTime() == null ? other.getLastLoginTime() == null : this.getLastLoginTime().equals(other.getLastLoginTime()))
            && (this.getLogin_num() == null ? other.getLogin_num() == null : this.getLogin_num().equals(other.getLogin_num()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getUser_login() == null) ? 0 : getUser_login().hashCode());
        result = prime * result + ((getUser_pass() == null) ? 0 : getUser_pass().hashCode());
        result = prime * result + ((getUser_nicename() == null) ? 0 : getUser_nicename().hashCode());
        result = prime * result + ((getUser_email() == null) ? 0 : getUser_email().hashCode());
        result = prime * result + ((getUser_url() == null) ? 0 : getUser_url().hashCode());
        result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getSignature() == null) ? 0 : getSignature().hashCode());
        result = prime * result + ((getQq() == null) ? 0 : getQq().hashCode());
        result = prime * result + ((getWechat() == null) ? 0 : getWechat().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getProvinceName() == null) ? 0 : getProvinceName().hashCode());
        result = prime * result + ((getCityName() == null) ? 0 : getCityName().hashCode());
        result = prime * result + ((getUser_status() == null) ? 0 : getUser_status().hashCode());
        result = prime * result + ((getUser_type() == null) ? 0 : getUser_type().hashCode());
        result = prime * result + ((getCreate_type() == null) ? 0 : getCreate_type().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        result = prime * result + ((getLastLoginIp() == null) ? 0 : getLastLoginIp().hashCode());
        result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
        result = prime * result + ((getLogin_num() == null) ? 0 : getLogin_num().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", mobile=").append(mobile);
        sb.append(", user_login=").append(user_login);
        sb.append(", user_pass=").append(user_pass);
        sb.append(", user_nicename=").append(user_nicename);
        sb.append(", user_email=").append(user_email);
        sb.append(", user_url=").append(user_url);
        sb.append(", avatar=").append(avatar);
        sb.append(", sex=").append(sex);
        sb.append(", birthday=").append(birthday);
        sb.append(", signature=").append(signature);
        sb.append(", qq=").append(qq);
        sb.append(", wechat=").append(wechat);
        sb.append(", province=").append(province);
        sb.append(", city=").append(city);
        sb.append(", provinceName=").append(provinceName);
        sb.append(", cityName=").append(cityName);
        sb.append(", user_status=").append(user_status);
        sb.append(", user_type=").append(user_type);
        sb.append(", create_type=").append(create_type);
        sb.append(", create_time=").append(create_time);
        sb.append(", lastLoginIp=").append(lastLoginIp);
        sb.append(", lastLoginTime=").append(lastLoginTime);
        sb.append(", login_num=").append(login_num);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}